package controller.startup
{
	import model.item.ItemModel;
	import model.monster.MonsterModel;
	import model.weapon.WeaponModel;
	
	import org.robotlegs.mvcs.StarlingCommand;
	
	import service.FileService;
	
	import view.event.main.ApplicationEvent;
	
	
	/**
	 * 注册相关的model
	 * @author £iang
	 * 
	 */	
	public class ConfigModelCommand extends StarlingCommand
	{
		//-----------------------------
		// variables
		//-----------------------------
		
		//-----------------------------
		// properties
		//-----------------------------
		
		//-----------------------------
		// setter&getter
		//-----------------------------
		
		//-----------------------------
		// methods
		//-----------------------------
		
		/**
		 * 执行函数 
		 * 
		 */		
		override public function execute():void 
		{
			injector.mapSingleton( MonsterModel );
			injector.mapSingleton( WeaponModel );
			injector.mapSingleton( ItemModel );
			injector.mapSingleton( FileService );
			
			dispatch( new ApplicationEvent( ApplicationEvent.CONFIG_VIEW ) );
		}
		
		//-----------------------------
		// events
		//-----------------------------
		
		//-----------------------------
		// dispose
		//-----------------------------
	}
}